-
Notifications
You must be signed in to change notification settings - Fork 27
Preserve inventory order when AI switches weapons #222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve inventory order when AI switches weapons #222
Conversation
This prevents AIs from messing up the inventory order whenever a player switches away from a unit while holding a tool or something. This has been bugging me for months.
|
...oh wait, there's also EquipNamedDevice that has the exact same code verbatim except for a different target it looks for. Just a minute, let me apply change to it too... |
|
Decided to properly check after a bunker breach session....There are 5 more times code like this is duplicated in this file. aAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |
|
...oh hold on there's now a crash when GetMass() enumerates mass of inventory items oops, lemme fix lmao |
Forgot to put this down in the various places oops lmao
gkljoiwjegoiwjoiuhbjfslkhgjwrpeso
|
I needed to just, record a video showing the inventory staying consistent despite the AI switching the inventory multiple times and equipping shields and stuff. The relief that I can just switch from a character in the middle of digging a tunnel to check up on another one, then come back and have the inventory ordered exactly as it was, is palpable. wasd.mp4 |
Causeless
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
|
WAIT DON'T MERGE YET, i just discovered one more slight issue here 😭😭😭😭😭😭😭 The new code, when it finds an item at Suboptimal! Had this crash exactly once a few days ago and couldn't find the issue until now lol Gimme a few minutes to figure out and push a fix. |
odksjhgvsdhgkjsdhghdsafoieh
Head branch was pushed to by a user without write access
|
all good now 👍 |
|
*stares in awe and incomprehension at the scary C pointer magics* |
|
@Architector4 Are you on the Discord by any chance? Really nice to see your contributions! |
I do have Discord, but I'm not active there at all. I do have a Telegram though that I'm active on lol |
This prevents AIs from messing up the inventory order whenever a player switches away from a unit while holding a tool or something.
This has been bugging me for months.